#ifndef __HASHVALUE_HPP__
#define __HASHVALUE_HPP__

/* Do not modify this file! */

#include <string>

/**
 * Stores a single, reduced-size hash (e.g. "de:ad:be:ef") of up to 16 Bytes
 */
class HashValue {

	private:
		const unsigned int length; /**< length of reduced-size hash in bytes */
		unsigned char data[16]; /**< byte-buffer stores the (complete) hash */

	public:
		HashValue(const unsigned int length);
		
		explicit HashValue(const unsigned char data[], const unsigned int length);

		std::string toHex(bool separated=true) const;

		void set(const unsigned char *data);
		
		/**
		 * Provides direct write access to internal byte-buffer
		 */
		unsigned char* getDataPtr();

		~HashValue();

		bool operator<(const HashValue &other) const;

		bool operator==(const HashValue &other) const;

};
#endif

